In general, stereo matching is a technique for detecting how far an object is distant through matching between pixels of left and right images.
For example, if one finger is positioned closely between both eyes, the finger is positioned at a right side when only the left eye is open, but the finger is positioned at a left side when only the right eye is open. On the other hand, when a person sees a mountain peak, the mountain peak will be positioned in the middle between both eyes when only the left eye is open or when only the right eye is open.
In the stereo matching, when an image is obtained using two cameras, the position at which an object is photographed by each of the cameras is changed depending on a distance. In this case, distance information is obtained using the information on the change in distance.
The difference between left and right images will be described using a photograph as an example. FIGS. 1A and 1B are exemplary views illustrating left and right images, respectively. As shown in FIGS. 1A and 1B, it can be seen that the difference in the position of an object shown in a dark color between the left and right images is large but the difference in the position of a background shown in a light color between the left and right images is small.
FIGS. 2A and 2B illustrate distance information of the left image of FIG. 1A and distance information of the right image of FIG. 1B, respectively. In FIGS. 2A and 2B, as the color of an object is brighter, the distance of the object from a camera is closer.
While a person recognizes distance information using left and right images, a computer cannot recognize using such a manner. Therefore, the computer uses a stereo matching technique. The stereo matching is a technique for detecting to which pixels of corresponding left and right images pixels of left and right images are matched, respectively.
In the stereo matching technique, it is assumed that the left and right images are rectified. When a photograph is arbitrarily taken using a stereo camera, the photograph is in an unrectified state as shown in FIG. 3A.
When an image is taken using a stereo camera, FIG. 3A illustrates an example of an unrectified image and FIG. 3B illustrates an example of a rectified image.
That is, the image of FIG. 3A means that left and right images are not rectified. If rectification is performed as shown in FIG. 3B in order to compensate for the unrectification between the left and right images, the left and right images are rectified, so that the left and right images have the same focal distance and the same baseline. The longitudinal positions of the left and right images are also rectified, so that when one line is laterally extracted from each of the left and right images, the extracted lines of the left and right images indicate the same portion.
Several methods are used as the stereo matching technique, and a Trellis is used as a representative of the several methods.
The Trellis is a stereo matching method of detecting a matching point by comparing one lines respectively extracted from left and right images. In the Trellis, the matching is performed independently from other lines by comparing one lines respectively extracted from left and right images. Therefore, streak noise in which lateral lines frequently occur in an image is frequently generated, which results in deterioration in quality of the image.